

<template>
  <div class="bf-commont-template">
    <!-- 操作记录 -->
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>操作记录</span>
      </div>
      <div >
        <div v-if="operlogs.length == 0" class="data-null">--暂无数据--</div>
        <!-- <div v-for="(item, index) in operlogs" :key="item.id" class="step padding-b border-t border-l border-r padding-t">
          <div><span class="padding-r label">操作备注:</span><span>{{item.operateMemo}}</span></div>
          <div><span class="padding-r label">操作id:</span><span>{{item.id}}</span></div>
          <div><span class="padding-r label">员工号:</span><span>{{item.employeeNo}}</span></div>
          <div><span class="padding-r label">操作人:</span><span>{{item.insertMan}}</span></div>
          <div><span class="padding-r label">操作日期:</span><span>{{item.insertDate}}</span></div>
          <div><span class="padding-r label">操作时间:</span><span>{{item.insertTime}}</span></div>
          <div><span class="padding-r label">修改表名称:</span><span>{{item.operateTable}}</span></div>
          <div><span class="padding-r label">修改类型:</span><span>{{item.operateType}}</span></div>
          <span class="step-index">{{index + 1}}</span>
        </div> -->
        <div>
          <bf-table
            :data="operlogs"
            :setting="setting"
            :hiddenPagination="true"
            ref="table"
          ></bf-table>
        </div>
      </div>
    </el-card>
    <div class="gap"></div>

  </div>
</template>

<script>
import { getEditLogApi } from '../api'
export default {
  props: ['employeeData'],
  data() {
    return {
      employeeNo: '',
      operlogs: [],
      setting: [
        {
          title: '操作备注',
          field: 'operateMemo',
          type: 'text',
          width: '200'
        },
        {
          title: '操作id',
          field: 'id',
          type: 'text'
        },
        {
          title: '员工号',
          field: 'employeeNo',
          type: 'text'
        },
        {
          title: '操作人',
          field: 'insertMan',
          type: 'text'
        },
        {
          title: '操作日期',
          field: 'insertDate',
          type: 'text'
        },
        {
          title: '操作时间',
          field: 'insertTime',
          type: 'text'
        },
        {
          title: '修改表名称',
          field: 'operateTable',
          type: 'text'
        },
        {
          title: '修改类型',
          field: 'operateType',
          type: 'text'
        }
      ]
    }
  },
  mounted: function() {
    this.employeeNo = this.employeeData.employeeNo
    this.queryOperlogs();
  },
  methods: {
    queryOperlogs(){
      getEditLogApi(this.employeeNo).then(response => {
        // console.log(response)
        this.operlogs = response.data
      })
    }
  }
}
</script>
<style scoped>
.step>div{
  margin-bottom: 10px;
}
.step>div:last-child{
  margin-bottom: 0;
}
.step>div:first-child{
  font-weight: 700;
  color: #303133;
  color:#0099ff;
}
.step{
  padding-left: 20px;
  padding-top: 20px;
  padding-bottom: 20px;
  position: relative;
  border-left: 1px solid #0099ff;
}
.step-index{
  position: absolute;
  left: -16px;
  top: -16px;
  height: 32px;
  width: 32px;
  border: 1px solid #0099ff;
  border-radius: 20px;
  text-align: center;
  line-height: 32px;
  background: #fff;
}
</style>
